// ----------------------------------
// RSDK Project: Sonic 2
// Script Description: Shooting Star Object
// Script Author: Christian Whitehead/Simon Thomley
// Unpacked by Rubberduckycooly's script unpacker
// ----------------------------------

// ========================
// Aliases
// ========================

private alias object.value0 : object.delay


// ========================
// Events
// ========================

event ObjectUpdate
	if object.delay > 0
		object.delay--
	else
		object.xpos -= 0x20000
		object.ypos += 0x10000
		if object.ypos > 0x1000000
			object.type = TypeName[Blank Object]
		end if

		object.frame = object.animationTimer
		object.frame >>= 2
		object.animationTimer++
		object.animationTimer &= 7
	end if
end event


event ObjectDraw
	DrawSprite(object.frame)
end event


event ObjectStartup
	LoadSpriteSheet("Title/Title.gif")
	SpriteFrame(-4, -4, 7, 7, 417, 59)
	SpriteFrame(-3, -3, 5, 5, 465, 61)
end event


// ========================
// Editor Events
// ========================

event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("Title/Title.gif")
	SpriteFrame(-4, -4, 7, 7, 417, 59)
	
	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
